|
SET PARTICLE VELOCITY
This command will set the velocity of particles within the particles object.
SET PARTICLE VELOCITY Particle Number, Velocity Value
Particle Number
Integer
The particle object number
Velocity Value
Float
The velocity value
This command does not return a value.
This controls the velocity at which the particles will move once emitted, and reflect the amount of energy expelled from the particles object.
load image "spec.bmp",3
make particles 3, 3, 10, 10.0
position particles 3, -3, 0, 10
position camera 0,1,0
point camera 0,1,400
while mouseclick()=0
if upkey()=1 then move camera 0.1
if downkey()=1 then move camera -0.1
if leftkey()=1 then turn camera left 1
if rightkey()=1 then turn camera right 1
color particles 3, rnd(255), rnd(255), rnd(255)
position particles 3, (mousex()-320)/50.0, 0, 10
set particle velocity 3, 4+rnd(2)
sync
endwhile
delete particles 3
end
PARTICLES Commands Menu
Index
|